package org.gwtde.client;

import net.mygwt.ui.client.MyDOM;
import net.mygwt.ui.client.Registry;
import net.mygwt.ui.client.util.Rectangle;

import com.google.gwt.user.client.ui.Widget;

public final class Desktop {

	public static Widget getContainer() {
		return (Widget) Registry.get(Constants.DESKTOP_CONTAINER);
	}

	public static int getClientWidth() {
		return getContainer().getOffsetWidth();
	}

	public static int getClientHeight() {
		return getContainer().getOffsetHeight();
	}

	public static Rectangle getBounds() {
		return MyDOM.getBounds(getContainer().getElement());
	}
}
